package main

import (
	"fmt"
	. "go_data_structures_and_algorithms/tool"
)

// 队列有两个指针 一个head 一个tail tail处入列 head处出列 所以是先进先出

func main() {

	var mq MyQueue[int]
	mq.Offer(99)
	mq.Offer(88)
	mq.Offer(77)
	fmt.Println(mq.Peek())
	fmt.Println(mq.Poll())
	fmt.Println(mq.Peek())
	fmt.Println(mq.Poll())
	fmt.Println(mq.Peek())
	fmt.Println(mq.Poll())
	fmt.Println(mq.Peek())

}
